import ajax from '../utils/axios'

export async function getUserOrder(params) {
  const res = await ajax.post(`/api/order/list`, params)
  return res.data.data
}

export async function deleteOrder(ids) {
  const res = await ajax.post(`/api/order/delete?ids=${ids}`)
  return res.data.data
}

export async function createOrder(params) {
  const res = await ajax.post(`/api/order/create`, params)
  return res.data.data
}

export async function updateOrder(params) {
  const res = await ajax.post(`/api/order/update`, params)
  return res.data.data
}

export async function getOrderDetail(params) {
  const res = await ajax.get(`/api/order/detail`, params)
  return res.data.data
}
